package com.example.controller;

import com.example.dto.RequestDto;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 业务聚合
 *
 * @version [V2.0]
 * @package com.example.controller;
 * @description:[用一句话描述该文件做什么]
 * @author: [zhuben]
 * @date: [2024-02-01 17:22]
 * @copyright: 2024 echovin.com
 */
@RestController
public class IndexController {

    @GetMapping("list")
    public ResponseEntity<?> list(){

        return ResponseEntity.ok("成功");
    }

    @PostMapping("get")
    public ResponseEntity<?> get(@RequestBody RequestDto requestDto){
        int i = requestDto.getAge() / 1;
        return ResponseEntity.ok(requestDto);
    }

}
